import {defineStore} from 'pinia'

// 存储应用程序的位置
const useBaseStore = defineStore('base', {
    state: () => ({
        // 1. 当前正在使用的搜索引擎 key
        useSearchEnginesKey: '',
        // 2. 当前使用的语言
        lang: 'zh-CN',
        // 搜索引擎
        searchEngine: [
            {
                "key": "baidu",
                "title": "百度",
                "href": "https://www.baidu.com/s?wd=%s&tn=68018901_2_oem_dg&ie=utf-8"
            },
            {
                "key": "bing",
                "title": "必应",
                "href": "https://www.bing.com/search?q="
            },
            {
                "key": "360",
                "title": "360搜索",
                "href": "https://www.so.com/s?q="
            }
        ],
        // 当前正在使用的
        searchEngines: "bing",
        // 当前搜索框配置
        search: {
            // 搜索框是否显示
            show: true,
            // 搜索框历史
            history: true,
            // 搜索框高度
            height: 60,
            // 搜索框圆角
            radius: 10,
            // 搜索框透明度
            opacity: 0.8,
            // 翻译引擎
            translate: "https://fanyi.baidu.com/#zh/en/",
            // 翻译是否隐藏
            translateHide: false,
        },
        theme: {
            mode: "light",
            system: true,
            color: "#1890ff"
        },
        sidebar: {
            placement: "left",
            autoHide: false,
            width: 42,
            lastGroup: false,
            mouseGroup: true,
            opacity: 0.5
        },
        // 壁纸
        wallpaper: {
            mask: 0,
            blur: 0,
            type: "2",
            src: "https://files.codelife.cc/itab/defaultWallpaper/videos/74.mp4",
            thumb: "https://files.codelife.cc/itab/defaultWallpaper/videos/74.jpg?x-oss-process=image/resize,limit_0,m_fill,w_1920,h_1080/quality,q_92/format,webp",
            time: 0,
            source: ""
        },
        layout: {
            "view": "widget",
            "yiyan": true
        },
        // 时间展示
        time: {
            show: true,
            size: 115,
            color: "#fff",
            fontWeight: "600",
            font: "dsdigi",
            hour24: true,
            sec: true,
            month: "inline",
            week: "inline",
            lunar: "inline"
        },
        open: {
            searchBlank: false,
            iconBlank: true
        },
        icon: {
            name: 1,
            nameSize: 12,
            nameColor: "#fff",
            startAnimation: false,
            iconRadius: 16,
            iconSize: 60,
            iconX: 30,
            iconY: 30,
            xysync: true,
            opactiy: 1,
            unit: "px",
            width: 1350
        },
        topSearch: [
            {
                name: "百度",
                id: "Jb0vmloB1G"
            },
            {
                name: "微博",
                id: "KqndgxeLl9"
            },
            {
                name: "知乎",
                id: "mproPpoq6O"
            }
        ]

    }),
    actions: {},
})
export default useBaseStore;
